#!/usr/bin/env python
# coding=utf-8
# 15/3/29 16:44 zhuxuehuang

import time
import threading


def worker():
    print "worker"
    time.sleep(1)
    return


threads = []

if __name__ == "__main__":
    for i in xrange(5):
        t = threading.Thread(target=worker)
        t.setDaemon(True)
        threads.append(t)
        t.start()

print('current has %d threads' % (threading.activeCount() - 1))

for item in threading.enumerate():
    print(item)

print('=' * 10)

for item in threads:
    print(item)

